Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test for ingress addon #2254

Merged
merged 4 commits into from
Dec 2, 2017
Merged

Add integration test for ingress addon #2254

merged 4 commits into from
Dec 2, 2017

Conversation

kairen
Copy link
Contributor

@kairen kairen commented Dec 1, 2017

The commit added test codes for Ingress addon, the feature request from #2174. This test will create a ingress binding nginx.example.com domain name, and resolve to nginx service, finally use HTTP request to check response content.

For test result as below:

$ make integration
cp ./out/minikube-linux-amd64 ./out/minikube
go test -v -test.timeout=30m k8s.io/minikube/test/integration --tags="integration container_image_ostree_stub containers_image_openpgp" 
=== RUN   TestDocker
Environment=DOCKER_RAMDISK=yes FOO=BAR BAZ=BAT

ExecStart={ path=/usr/bin/dockerd ; argv[]=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=virtualbox --insecure-registry 10.96.0.0/12 --debug --icc=true ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }

--- PASS: TestDocker (73.77s)
=== RUN   TestFunctional
=== RUN   TestFunctional/Status
=== RUN   TestFunctional/DNS
=== RUN   TestFunctional/Logs
=== RUN   TestFunctional/Addons
=== RUN   TestFunctional/Dashboard
=== RUN   TestFunctional/IngressController
=== RUN   TestFunctional/ServicesList
=== RUN   TestFunctional/Provisioning
=== RUN   TestFunctional/EnvVars
=== RUN   TestFunctional/SSH
--- PASS: TestFunctional (16.45s)
    --- PASS: TestFunctional/Status (15.46s)
    	cluster_status_test.go:35: Checking if cluster is healthy.
    	cluster_status_test.go:45: Component: , Healthy: True.
    	cluster_status_test.go:45: Component: , Healthy: True.
    	cluster_status_test.go:45: Component: , Healthy: True.
    --- PASS: TestFunctional/Addons (0.24s)
    --- PASS: TestFunctional/SSH (0.55s)
    --- PASS: TestFunctional/EnvVars (0.81s)
    --- PASS: TestFunctional/ServicesList (1.05s)
    --- PASS: TestFunctional/Provisioning (1.39s)
    --- PASS: TestFunctional/Logs (2.15s)
    --- PASS: TestFunctional/Dashboard (9.78s)
    --- PASS: TestFunctional/DNS (12.18s)
    --- PASS: TestFunctional/IngressController (88.20s)
=== RUN   TestPersistence
--- PASS: TestPersistence (84.68s)
=== RUN   TestStartStop
--- PASS: TestStartStop (143.71s)
PASS
ok  	k8s.io/minikube/test/integration	406.872s

/cc @r2d4

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 1, 2017
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@r2d4
Copy link
Contributor

r2d4 commented Dec 1, 2017

@minikube-bot ok to test

@kairen
Copy link
Contributor Author

kairen commented Dec 2, 2017

@r2d4 I have fixed the failed issue, now tests passed.

Copy link
Contributor

@r2d4 r2d4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this is much appreciated.

minikubeRunner := NewMinikubeRunner(t)
kubectlRunner := util.NewKubectlRunner(t)

minikubeRunner.RunCommand("addons enable ingress", true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future work, we should utilize the minikube cache command to make sure that the ingress controller image is cached for our tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@r2d4 Okay, I'll make this feature.

Copy link
Contributor Author

@kairen kairen Dec 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this feature from #2273 .

@r2d4 r2d4 merged commit 8f55fb7 into kubernetes:master Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants